package com.buer.train.common.config.es;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 *
 * @ProjectName:
 * @Package:        com.buer.train.common.config.es
 * @ClassName:      ElasticSearchClientConfig
 * @Description:    http://114.67.120.64:9200/
 * @Author:         lds
 * @CreateDate:     2021/5/25 11:03
 * @UpdateUser:     更新者
 * @UpdateDate:     2021/5/25 11:03
 * @UpdateRemark:   更新内容
 * @Version:        1.0
 */
@Configuration
public class ElasticSearchClientConfig {
    @Bean
    public RestHighLevelClient restHighLevelClient(){
        return new RestHighLevelClient(
                RestClient.builder(
                        new HttpHost("114.67.120.64", 9200, "http")));
    }
}